<template>
    <div class="setting">
        <common-header>
            <template #text>
                <p>设置</p>
            </template>
        </common-header>

        <div class="logout" @click="logout">退出登录</div>
            
        
    </div>
</template>
<script>
import commonHeader from "../components/common-header.vue"
export default {
    name:"Setting",
    components:{
        commonHeader
    },
    methods:{
        logout(){
            localStorage.removeItem("userToken");
            this.$store.state.userToken =null;
            this.$router.replace({path:"/home"})
        }
    }
}
</script>
<style lang="scss" scoped>
@import "../assets/common/base.scss";
.setting{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: $bodyCol;
}
.logout{
    margin-top: 60px;
    height: 40px;
    line-height: 40px;
    background-color: #fff;
    font-size: 14px;
    color: rgb(163, 45, 45);
    text-align: center;
}
</style>